﻿using SIG.Core;
using SIG.Resources;
using SIG.Resources.Admin;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Web.Mvc;

namespace SIG.Model.Articles
{
    public partial class Article : AuditableEntity<int>
    {
        public Article()
        {
            this.EntityName = EntityNames.Article;
        }  
        public string Title { get; set; }
        public string Body { get; set; }    
   
        public string Summary { get; set; }
        public int ViewCount { get; set; }
  
        public int CategoryId { get; set; }
        public string Thumbnail { get; set; }
        public string FullImage { get; set; }
        public bool Active { get; set; }
        public bool Recommend { get; set; }
        public string Source { get; set; }
        public virtual ArticleCategory Category { get; set; }

        public string CategoryTitle
        {
            get
            {
                if (this.Category != null)
                {
                    return this.Category.Title;
                }
                return string.Empty;
            }
        }
    }
}
